package com.zack.designPattern.state;

public class Demo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		StateHolder sh1 = new StateHolder(1);
		for(int i=0 ; i<5 ;i++){
			sh1.work();
		}
		
		StateHolder sh2 = new StateHolder(-1);
		for(int i=0 ; i<5 ;i++){
			sh2.work();
		}

	}

}
